Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python integration #317

Merged
merged 25 commits into from
Mar 8, 2024
Merged

Python integration #317

merged 25 commits into from
Mar 8, 2024

Conversation

HLWeil
Copy link
Member

@HLWeil HLWeil commented Mar 1, 2024

  • Setup build and test targets for Python
  • Full integration of Fable transpilation to Python
  • Extended developer setup instructions
  • Moved JsonSchemaValidation to tests

@HLWeil HLWeil marked this pull request as ready for review March 1, 2024 13:09
@HLWeil
Copy link
Member Author

HLWeil commented Mar 1, 2024

CI needs to be updated

let ARCtrl_generate (rootPath: string) =
generateIndexFileContent classes
|> Array.reduce (fun a b -> a + "\n" + b)
|> writePyIndexfile rootPath
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@@ -30,8 +30,9 @@ let gitHome = $"https://github.com/{gitOwner}"

let projectRepo = $"https://github.com/{gitOwner}/{project}"

let pkgDir = "dist/pkg"
let netPkgDir = "dist/pkg"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no relative path?

pyproject.toml Outdated
name = "ARCtrl"
version = "1.0.0"
description = "Library for management of Annotated Research Contexts (ARCs) using an in-memory representation and runtimer agnostic contract systems."
authors = ["Heinrich Lukas Weil <[email protected]>"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this file be on .gitignore?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Badly worded. I mean should this file be pushed or was it just for testing?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the whole folder and setup file. Was there for initial testing

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

@@ -160,7 +160,7 @@ module ArcTableExtensions =

member this.ToCompressedJsonString(?spaces) : string =
let spaces = defaultArg spaces 0
let stringTable = Dictionary()
let stringTable = Dictionary()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

??

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very important change 😄

let sort (a : 'T []) =
#if FABLE_COMPILER_PYTHON
a |> List.ofArray |> List.sort |> Array.ofList
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what? 😮

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This 100% requires a comment explaining this

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fable-compiler/Fable#3638

Seems to be fixed now.

@@ -75,6 +75,26 @@ module ResizeArray =
a.Count = 0

module HashCodes =

open Fable.Core

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment explaining this. Is this related to an open issue on Fable-compiler?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will open up an issue on this in Fable. Some problem with Hash overrides and Record Types.

testpy.cmd Outdated
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this file be committed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

@@ -282,9 +282,19 @@ let tests_ArcAssay = testList "ArcAssay" [
for j = 0 to cells.Length - 1 do
t.Values.[(j,i)] <- cells.[j]
let f() = ArcAssay.toJsonString a
#if FABLE_COMPILER_JAVASCRIPT
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better:

let expectedMs = 
  #if FABLE_COMPILER_JAVASCRIPT
  5000
  #endif
  #if FABLE_COMPILER_PYTHON
  100000
  #endif
  #if !FABLE_COMPILER
  2500
  #endif

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will move all of this into a performance checking project anyways.

@@ -1,6 +1,6 @@
{
"name": "@nfdi4plants/arctrl",
"version": "1.1.0+6309e03",
"version": "1.2.0+19d850e",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use short semver without metadata

@HLWeil
Copy link
Member Author

HLWeil commented Mar 8, 2024

Done, will be updated with next version tick.

Copy link
Collaborator

@Freymaurer Freymaurer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets go! 🚀

@HLWeil HLWeil merged commit abd3d89 into main Mar 8, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants